﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Agility.Web.Repositories
{
    /// <summary>
    /// Defines the interface of the Repository pattern
    /// </summary>
    public interface IRepository : IUnitOfWork
    {
        IQueryable GetEntities();
        void Insert(object entity);
        void Update(object entity, object original);
        void Delete(object entity);
    }

    /// <summary>
    /// Defines the interface of the Repository pattern using Generics
    /// </summary>
    public interface IRepository<T> : IRepository
    {
        IQueryable<T> GetEntities();
        void Insert(T entity);
        void Update(T entity, T original);
        void Delete(T eintity);
    }
}